package com.ruoyi.project.bid.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.bid.mapper.CustomerDetailMapper;
import com.ruoyi.project.bid.domain.CustomerDetail;
import com.ruoyi.project.bid.service.ICustomerDetailService;

/**
 * 对接客户的明细Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-11-27
 */
@Service
public class CustomerDetailServiceImpl implements ICustomerDetailService 
{
    @Autowired
    private CustomerDetailMapper customerDetailMapper;

    /**
     * 查询对接客户的明细
     * 
     * @param id 对接客户的明细ID
     * @return 对接客户的明细
     */
    @Override
    public CustomerDetail selectCustomerDetailById(Long id)
    {
        return customerDetailMapper.selectCustomerDetailById(id);
    }

    /**
     * 查询对接客户的明细列表
     * 
     * @param customerDetail 对接客户的明细
     * @return 对接客户的明细
     */
    @Override
    public List<CustomerDetail> selectCustomerDetailList(CustomerDetail customerDetail)
    {
        return customerDetailMapper.selectCustomerDetailList(customerDetail);
    }

    /**
     * 新增对接客户的明细
     * 
     * @param customerDetail 对接客户的明细
     * @return 结果
     */
    @Override
    public int insertCustomerDetail(CustomerDetail customerDetail)
    {
        customerDetail.setCreateTime(DateUtils.getNowDate());
        return customerDetailMapper.insertCustomerDetail(customerDetail);
    }

    /**
     * 修改对接客户的明细
     * 
     * @param customerDetail 对接客户的明细
     * @return 结果
     */
    @Override
    public int updateCustomerDetail(CustomerDetail customerDetail)
    {
        customerDetail.setUpdateTime(DateUtils.getNowDate());
        return customerDetailMapper.updateCustomerDetail(customerDetail);
    }

    /**
     * 批量删除对接客户的明细
     * 
     * @param ids 需要删除的对接客户的明细ID
     * @return 结果
     */
    @Override
    public int deleteCustomerDetailByIds(Long[] ids)
    {
        return customerDetailMapper.deleteCustomerDetailByIds(ids);
    }

    /**
     * 删除对接客户的明细信息
     * 
     * @param id 对接客户的明细ID
     * @return 结果
     */
    @Override
    public int deleteCustomerDetailById(Long id)
    {
        return customerDetailMapper.deleteCustomerDetailById(id);
    }
}
